Skip to content

Conversation

kienhg96
Copy link

  • The current implementation only supports .so (Unix-like platforms) and .dll (Windows) extensions
  • macOS requires .dylib for native modules

@saghul
Copy link
Contributor

saghul commented Jun 23, 2025

This breaks the examples macOS target: https://github.com/quickjs-ng/quickjs/actions/runs/15814570112/job/44575061740?pr=1107

Now, a 2nd bug here is why didn't the interpreter exit with error?!

@kienhg96
Copy link
Author

The CI process does not relate to this PR, so I'm checking the examples for macOS target.

@kienhg96
Copy link
Author

@saghul how do you think about the unique filename suffix for binary addon. In nodeJS, they have .node and I suggest .qjs as the common extension

@kienhg96
Copy link
Author

In macOS, CMake will generate the default suffix for binary output files depending on the type of library. SHARED libraries have suffix .dylib and MODULE libraries have suffix .so. So QJS should handle both of them.

@saghul
Copy link
Contributor

saghul commented Jun 24, 2025

In macOS, CMake will generate the default suffix for binary output files depending on the type of library. SHARED libraries have suffix .dylib and MODULE libraries have suffix .so. So QJS should handle both of them.

Sounds about right.

@bnoordhuis
Copy link
Contributor

I don't know about trying both, that has potential for confusion.

How problematic is use of .so instead of .dylib on macos? Not much, I expect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants